<template>
	<div class="header-com">
		<p class="header-left">
				<Iconfont @click.native="goBack" iconClass="iconfont iconmjiantou-copy"/>
		</p>	
		<p class="header-center">{{title}}</p>
		<p class="header-right">
            <span @click="rightEvent">{{rightTitle}}</span>
        </p>
	</div>
</template>
<script>
	export default {
        props: {
            title:{
                type:String,
                default:''
            },
            rightTitle:{
                type:String,
                default:''
            }
            
        },
		data() {
			return {
		
			}
        },
        
		created() {

		},
		mounted() {
			
		},
		
		
		computed: {
			
		},
		methods: {
            // 返回
            goBack(){		
			   let _this =this
               let str = _this.$route.meta.refer;
				if(str.includes('/zhxyk/zhxykHome')){
					this.$router.go(-1)  
				}else{
					_this.$router.push({
						path: `${"/" + _this.$channel +"/"+ _this.$channel+'Home'}`
					});	
				}

			// this.$router.go(-1)    
            },
            //  右侧事件
            rightEvent(){
              this.$emit("right", {type:'headerCom',info:'右侧点击事件'});
            }
           
		}
	};
</script>
<style scoped="scoped">
	 .header-com{
		width: 100vw;
		height: 88px;
		display: flex;
		align-items: center;
        justify-content: space-between;
        padding-left: 28px;
        padding-right: 32px;
        color: #27344B;
        border: 1px solid #EEEEEE;
    	
	}

	.header-left,
	.header-right {
		height: 100%;
        width: 200px;
		display: flex;
		align-items: center;
	}
	
    .header-right{
        justify-content: flex-end;
        font-size: 32px;
        font-weight: 400;
        
    }
	.header-left .iconfont{
		font-size: 36px;
        font-weight: 600;
	}
	

	.header-center{
		flex: 1;
		text-align: center;		
		font-size: 36px;
        font-weight: 500;
	}
	
</style>